<%-- 
    Document   : IssueReport
    Created on : May 26, 2014, 5:16:43 PM
    Author     : mishra
--%>

<%
    try {
        if (session.getAttribute("uid") != null) {
            if (session.getAttribute("Library_Report_Book_Issue_Wise").toString().equals("1")) {
%>
<html lang="en">

    <head>
        <meta charset="utf-8">
        <title>Ramgovind Automated System</title>
        <meta name="description" content="">

        <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap-responsive.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/uniform.default.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap.datepicker.css">
        <link rel="stylesheet" href="/RIT/css/jquery.cleditor.css">
        <link rel="stylesheet" href="/RIT/css/jquery.plupload.queue.css">
        <link rel="stylesheet" href="/RIT/css/jquery.tagsinput.css">
        <link rel="stylesheet" href="/RIT/css/jquery.ui.plupload.css">
        <link rel="stylesheet" href="/RIT/js/tableTools/css/TableTools.css">
        <link rel="stylesheet" href="/RIT/css/chosen.css">
        <link rel="stylesheet" href="/RIT/css/chosen.css">
        <link rel="stylesheet" href="/RIT/css/style.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        <link rel="stylesheet" href="/RIT/css/lightBox.css">
        <script type="text/javascript">
            function IssueReport()
            {
                document.getElementById('ILoader').setAttribute("style", "visibility: visible;width: 250px;height: 250px;position: absolute;top: 50%;left:50%;margin-top: -80px;margin-left: -40px;background:url(/RIT/img/loader.gif) no-repeat;z-index: 667999;background-size:200px 200px;");
                var table = document.getElementById('ct');
                for(var i = table.rows.length - 1; i > 0; i--)
                {
                    table.deleteRow(i);
                }
                var xmlhttp; 
                if (window.XMLHttpRequest)
                {
                    xmlhttp=new XMLHttpRequest();
                }
                else
                {
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange=function()
                {
                    if (xmlhttp.readyState==4 && xmlhttp.status==200)
                    { 
            
                        document.getElementById('ctbody').innerHTML=xmlhttp.responseText;
                         document.getElementById('ILoader').removeAttribute("style");
                
                    }
                }
                xmlhttp.open("POST","/RIT/IssuedReport",true);
                xmlhttp.send();
          }
          function StudentDetails(id)
            { 
                //document.getElementById('iconLoader').setAttribute("style", "visibility: visible;width: 100%;height: 100%;position: fixed;z-index: 666999;top: 0;left: 0;right: 0;bottom: 0;background: url(/BASIL/images/patterns/3-1.png) repeat;opacity: 0.5;");
                //document.getElementById('ILoader').setAttribute("style", "visibility: visible;width: 120px;height: 120px;position: absolute;top: 50%;left:50%;margin-top: -80px;margin-left: -40px;background:url(/BASIL/images/loader.gif) no-repeat;z-index: 667999;");
                var xmlhttp; 
                if (window.XMLHttpRequest)
                {
                    xmlhttp=new XMLHttpRequest();
                }
                else
                {
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange=function()
                { 
                    if (xmlhttp.readyState==4 && xmlhttp.status==200)
                    {
                        //document.getElementById('iconLoader').removeAttribute("style");
                        //document.getElementById('ILoader').removeAttribute("style");
                        document.getElementById('fade').style.display='block';
                        document.getElementById("detailDiv").innerHTML=xmlhttp.responseText;
                        $("#detailDiv").fadeIn(1000);
                    }
                }
                xmlhttp.open("POST","/RIT/getStudentdetail?aId="+id,true);
                xmlhttp.send();
            } 
            function EmployeeDetails(id)
            { 
                //document.getElementById('iconLoader').setAttribute("style", "visibility: visible;width: 100%;height: 100%;position: fixed;z-index: 666999;top: 0;left: 0;right: 0;bottom: 0;background: url(/BASIL/images/patterns/3-1.png) repeat;opacity: 0.5;");
                //document.getElementById('ILoader').setAttribute("style", "visibility: visible;width: 120px;height: 120px;position: absolute;top: 50%;left:50%;margin-top: -80px;margin-left: -40px;background:url(/BASIL/images/loader.gif) no-repeat;z-index: 667999;");
                var xmlhttp; 
                if (window.XMLHttpRequest)
                {
                    xmlhttp=new XMLHttpRequest();
                }
                else
                {
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange=function()
                { 
                    if (xmlhttp.readyState==4 && xmlhttp.status==200)
                    {
                        //document.getElementById('iconLoader').removeAttribute("style");
                        //document.getElementById('ILoader').removeAttribute("style");
                        document.getElementById('fade').style.display='block';
                        document.getElementById("detailDiv").innerHTML=xmlhttp.responseText;
                        $("#detailDiv").fadeIn(1000);
                    }
                }
                xmlhttp.open("POST","/RIT/getEmployeeDetails?aId="+id,true);
                xmlhttp.send();
            } 
        </script>
    </head>
    <body onload="IssueReport()">					
        <div id="detailDiv" class="white_content"></div>
        <div id="fade" class="black_overlay"></div>
        <div id="ILoader"></div>
        <%@include file="/topheader.html" %>
        <%@include file="/reportheader.html" %>
        <div class="main">
            <div class="container-fluid">
                <%@include file="/Reports/reportsidenav.html" %>
                <div class="content">
                    <div class="row-fluid">
                        <div class="box">
                            <div class="box-head tabs">
                                <h3>Book Issued Report</h3>
                            </div>
                            <div class="box-content box-nomargin">
                                <table class='table table-striped dataTable-noheader dataTable-nofooter table-bordered' style="font-size: 13px;" id="ct">
                                    <thead>
                                        <tr>
                                            <th>Emp/Adm. No</th>
                                            <th>Book No.</th>
                                            <th>Book Name</th>
                                            <th>Issue Date</th>
                                            <th>Return Date</th>
                                            <th>User Type</th>
                                        </tr>
                                    </thead>
                                    <tbody id="ctbody">

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>	
            </div>
        </div>
    </div>	
    <script src="/RIT/js/jquery.js"></script>
    <script src="/RIT/js/less.js"></script>
    <script src="/RIT/js/bootstrap.min.js"></script>
    <script src="/RIT/js/jquery.uniform.min.js"></script>
    <script src="/RIT/js/bootstrap.timepicker.js"></script>
    <script src="/RIT/js/bootstrap.datepicker.js"></script>
    <script src="/RIT/js/chosen.jquery.min.js"></script>
    <script src="/RIT/js/jquery.fancybox.js"></script>
    <script src="/RIT/js/plupload/plupload.full.js"></script>
    <script src="/RIT/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
    <script src="/RIT/js/jquery.cleditor.min.js"></script>
    <script src="/RIT/js/jquery.inputmask.min.js"></script>
    <script src="/RIT/js/jquery.tagsinput.min.js"></script>
    <script src="/RIT/js/jquery.mousewheel.js"></script>
    <script src="/RIT/js/jquery.dataTables.min.js"></script>
    <script src="/RIT/js/jquery.dataTables.bootstrap.js"></script>
    <script src="/RIT/js/jquery.textareaCounter.plugin.js"></script>
    <script src="/RIT/js/ui.spinner.js"></script>
    <script src="/RIT/js/jquery.cookie.js"></script>
    <script src="/RIT/js/tableTools/js/TableTools.min.js"></script>
    <script src="/RIT/js/custom.js"></script><script src="js/demo.js"></script>
    <script src="/RIT/js/iconfont.js"></script>
    <script>
        function quickClose(){
            $("#detailDiv").fadeOut(500);
            $("#fade").fadeOut(100);
        }
    </script>
</body>

</html>

<%} else {
%>
<script type="text/javascript">
    alert("You Are Not Authorised");
    window.history.back();
</script>
<%            }
        } else {
            request.setAttribute("msg", "You Are Not Authorised! Please Contact to System Administrator!");
            request.setAttribute("value", "0");
            getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        }
    } catch (Exception e) {
        request.setAttribute("msg", "Please Contact to System Administrator!");
        request.setAttribute("value", "0");
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
    }
%>
